﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using BusinessFacade;
using Entities;

namespace MedicareNoteManagerWeb.Web
{
    public partial class ReadMessagePlan : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            mta_MessagePlanAudit_Model model = new mta_MessagePlanAudit_Model();
            Busi_MessagePlanAudit bmpa = new Busi_MessagePlanAudit();
            if (!Page.IsPostBack)
            {
                model.PlanID = int.Parse(Request.QueryString["planID"].ToString());
            }
            //int qsl = ClientQueryString.Length;
            //model.PlanID = int.Parse(ClientQueryString.Substring(7));
            DataTable dt = bmpa.ReadMessage(model);
            foreach (DataRow dr in dt.Rows)
            {
                this.lbl_PlanName.Text = dr["planname"].ToString();
                this.lbl_PlanExplain.Text = dr["planexplain"].ToString();
                this.lbl_PlanMain.Text = dr["notecontent"].ToString();
                this.lbl_PlanMouble.Text = dr["MoubleName"].ToString();
                this.lbl_MoubleArea.Text = dr["AreaName"].ToString();
                this.lbl_MoubleExplain.Text = dr["MoubleExplain"].ToString();
                DateTime a = Convert.ToDateTime(dr["sendtime"].ToString());
                this.lbl_SendTime.Text = a.ToShortDateString();
            }
            //this.lbl_PlanName.Text = model.PlanName;
            //this.lbl_PlanMouble.Text = model.PlanMouble;
            //this.lbl_PlanMain.Text = model.PlanMain;
            //this.lbl_SendTime.Text = model.SendTime.ToShortDateString();
        }
    }
}